// 定义数据颜色 好友 群组 选中
import type { Ref } from "vue";

export const colorList = ["#484d5f", "#2c3e50", "#5b5e69"];

// 显示列表
export const showListFunc = (): [(() => Ref<Number>), (() => void)] => {
  const showList: Ref<boolean> = ref(true);
  const listFlex: Ref<Number> = ref(1);
  watch(showList, () => {
    if (showList.value) {
      listFlex.value = 1;
      return;
    }
    listFlex.value = 0;
  });
  const get = () => {
    return listFlex;
  }
  const update = () => {
    showList.value = !showList.value;
  };
  return [get, update];
};
